// pages/my/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    show1: false,
    currentDate: new Date().getTime(),
    maxDate: new Date().getTime(),
    params: {
      tollCollectorId: '',
      year: '',
      month: ''
    },
    info:{}
  },
//   查询用户信息
 performance(){
    this.setData({
        info:{
            daysDue: 10,
            daysArrival: 8,
            beLate: 2,
            leaveEarly: 2,
            evidenceViolationTimes: 12,
            payParkingFeeTimes:  22,
            payParkingFeeAmount: 100
         }
    })
 },
  onInput(event) {
    console.log(event)
    this.setData({
      currentDate: event.detail,
      show1: false,
      params: {
        tollCollectorId: wx.getSystemInfoSync('info').tollCollectorId,
        year: new Date(event.detail).getFullYear(),
        month: new Date(event.detail).getMonth() + 1
      }
    });
  },
  showDate() {
    this.setData({
      show1: true
    })
  },
  onClose() {
    this.setData({
      show1: false
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.performance()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    if (typeof this.getTabBar === 'function' &&
      this.getTabBar()) {
      this.getTabBar().setData({
        selected: 1,
        list: [{
            "pagePath": "/pages/work/index",
            "text": "我的工作",
            "iconPath": "/images/tabbar/work.png",
            "selectedIconPath": "/images/tabbar/worka.png"
          },
          {
            "pagePath": "/pages/my/index",
            "text": "个人中心",
            "iconPath": "/images/tabbar/user.png",
            "selectedIconPath": "/images/tabbar/usera.png"
          }
        ]
      })
    }
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})